<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
    }

    body {
        background: rgb(236, 228, 228);
    }

    .box {
        width: 600px;
        height: 500px;
        margin: auto;
        background: #fff;
    }

    #int {
        width: 400px;
        height: 40px;
        margin: 50px;
        font-size: 24px;
        padding-left: 50px;
        padding-right: 50px;
    }

    #img1 {
        position: absolute;
        top: 65px;
        left: 717px;
        margin: auto;
        display: none;
    }

    /* table {
        border: 1px solid red;
        margin: auto;
    }

    tr,th,
    td {
        width: 150px;
        height: 20px;
        border: 1px solid red;
    } */

    ul li {
        list-style: none;
    }
</style>

<body>
    <div class="box">
        <input type="text" id="int" placeholder="输入内容">
        <img src="./img/1.png" alt="" id="img1">
        <button id="submit">提交</button>
        <!-- <table>
            <tr>
                <th>任务列表</th>
            </tr>
            <tbody></tbody>
        </table> -->
        <ul></ul>
    </div>
</body>
<script>
    var content = document.getElementById('int').value
    content.onblur = function () {
        localStorage.setItem('content',str.content)
        var str = ''
        for (let k in content) {
            str += '<li>任务' + (+k + 1) + ':' + content + '</li>'
        }
        document.getElementsByName('ul').innerHTML = str
    }

    // submit.onblur = function () {
    //     if (content != '' && content == '') {
    //         box1.innerHTML = content
    //     }
    //     submit.onclick = function () {
    //         img1.style.display='block'
    //     }
    // }

</script>

</html>